refactor: Minor cleanups in Unity Transport#3377
Merged
simon-lemay-unity merged 7 commits intodevelop-2.0.0from Apr 8, 2025
Merged
refactor: Minor cleanups in Unity Transport#3377simon-lemay-unity merged 7 commits intodevelop-2.0.0from
simon-lemay-unity merged 7 commits intodevelop-2.0.0from
Conversation
Member
|
Looks good for me but I would wait for @NoelStephensUnity or @EmandM to approve. Do you think those changes should also be ported to develop branch (NGOv1.X)? |
Contributor
Author
|
I don't think it's worth backporting those changes to version 1.X. They don't really fix anything and they're mostly cleanups I did while working on performance improvements and those will be 2.X-only. |
Member
|
Okok, makes sense |
EmandM
approved these changes
Apr 8, 2025
Member
EmandM
left a comment
There was a problem hiding this comment.
This looks much cleaner. Thank you!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just a few minor cleanups in Unity Transport:
NetworkDriveraccessor. There's a publicGetNetworkDrivernowadays that can be used for the same purpose.usingdirective for transport errors which avoids using the full (and long) type name.m_ServerClientId. Plus, theListeningstate did not have the same meaning as it does in NGO itself, which could lead to confusion.ErrorUtilitiesto avoid the useless constants and only providing strings for errors users can actually do something about. Also moved it to the bottom of the file. The top is too prime real estate for such a minor utility. :PChangelog
N/A
Testing and Documentation